Re: [HACKERS] Trouble in paradise: cancel via postmaster ain't so cool

Поиск
Список
Период
Сортировка
От Henry B. Hotz
Тема Re: [HACKERS] Trouble in paradise: cancel via postmaster ain't so cool
Дата
Msg-id v03130313b1c86614c6b4@[137.78.218.94]
обсуждение исходный текст
Ответ на Trouble in paradise: cancel via postmaster ain't so cool  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [HACKERS] Trouble in paradise: cancel via postmaster ain't so cool
Список pgsql-hackers
At 3:46 PM -0700 7/7/98, Tom Lane wrote:
>I can see several alternatives, none very attractive:
>
>1. Try to code the new PQrequestCancel so that it doesn't invoke
>any likely-non-reentrant part of the C library.  Difficult at best,
>maybe impossible (is gethostbyname reentrant?  I doubt it if malloc
>isn't).
...

>I will work on #1 but I am not very hopeful of success.  Has anyone
>got a better idea?

Idea A:  precompute everything you need to do a cancel as part of sending
the request in the first place so #1 above takes minimum effort (i.e. no
malloc(), no gethostbyname(), no nothing).

Idea B:  spawn (vfork()/exec()) a cancel process so all the funny stuff
happens in a different address space.

Idea C:  look at what some standard network clients do to handle similar
problems.  What does ftp do for example?  It also seems like some network
programming textbooks, like Stevens, should discuss this problem.

Signature failed Preliminary Design Review.
Feasibility of a new signature is currently being evaluated.
h.b.hotz@jpl.nasa.gov, or hbhotz@oxy.edu



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Re: [BUGS] Small bug in union
Следующее
От: "Thomas G. Lockhart"
Дата:
Сообщение: Re: [HACKERS] Re: [BUGS] Small bug in union